<template>
	<view class="xuanchuan">
		<view class="status_bar">
		</view>
		<view class="yujing-word1">
			<image src="../../../../static/yujing/back.png" mode="" @click="to_shouye()"></image>
			<view class="word1-word">
				反诈宣传
			</view>
		</view>
		<view class="box">
			<!-- <view class="xuanchuan-tip">
				<h2>全民反诈，做到不松“蟹”!</h2>
				<text>天下无诈 2018-09-12 15：36：02</text>
				<p>{{xuanchuandata[index].zwyi}}</p>
			</view>
			
			<view class="xuanchuan-img1">
				<img :src="xuanchuan[index].imgUrlyi" alt="">
			</view>
			<view class="xuanchuan-tip">
				<p>{{xuanchuandata[index].zwer}}</p>
			</view>
			<view class="xuanchuan-img1">
				<img :src="xuanchuan[index].imgUrl2" alt="">
			</view>
			<view class="xuanchuan-tip">
				<p>{{xuanchuandata[index].zwsan}}</p>
			</view> -->
			<view class="xuanchuan-tip">
				<h2>{{xuanchuandata[xx].tip}}</h2>
				<text>天下无诈 {{xuanchuandata[xx].time}}</text>
				<p>{{xuanchuandata[xx].zwyi}}</p>
			</view>
			<view class="xuanchuan-img1">
				<img :src="xuanchuandata[xx].imgUrlyi">
			</view>
			<view class="xuanchuan-tip">
				<p>{{xuanchuandata[xx].zwer}}</p>
			</view>
			<view class="xuanchuan-img1">
				<img :src="xuanchuandata[xx].imgUrler">
			</view>
			<view class="xuanchuan-tip">
				<p>{{xuanchuandata[xx].zwsan}}</p>
			</view>
		</view>
		<pinglun></pinglun>
	</view>
</template>

<script>
	import pinlun from "@/components/pinglun/pinglun.vue"
	import mh_segmentbar from "@/components/mh-segmentbar/mh-segmentbar.vue"
	import swiperContent from "@/components/swiperContent/swiperContent.vue"
	import swiperContent2 from "@/components/swiperContent/swiperContent2.vue"
    var that='';
	export default {
		components: {
			pinlun,
			mh_segmentbar,
			swiperContent,
			swiperContent2
		},


		data() {
			return {
				xuanchuandata: [],
				index: 0,
				xx:5,
				tip:''

			}
		},
		unmounted() {
			 that=this;
		},
		onLoad(option) {
			 
			 this.xx=option.xx;
			 console.log();
			 
		},
		onShow() {

		},
		methods: {
			to_shouye() {
				uni.switchTab({
					url: "../../shouye"
				})
			},
			to_zhapianleixing() {
				uni.navigateTo({
					url: "./zhapianleixing"
				})
			}
		},
		mounted() {
			var that = this;
			uni.request({
				url: 'http://127.0.0.1:8080/xuanchuan/xuanchuanlist', //仅为示例，并非真实接口地址。
				method: 'GET',
				dataType: 'json',
				data: {

				},
				header: {
					// 'custom-header': 'hello' //自定义请求头信息
				},
				success: (res) => {
					// console.log(res.data.data);
					that.xuanchuandata = res.data.data;
					// console.log(that.luntanLists);
					console.log(that.xuanchuandata);
				}
			});

		}

	}
</script>

<style>
	page {
		background-image: url(@/static/bj1.png);
		background-repeat: no-repeat;
		background-attachment: fixed;
		background-size: 100% 100%;
	}

	* {
		padding: 0%;
		margin: 0%;
	}

	image {
		display: flex;
	}

	.yujing-word1 {
		width: 90%;
		height: 100rpx;
		margin: auto;
		margin-top: 40rpx;
		position: relative;

	}

	.word1-word {
		color: white;
		font-size: 40rpx;
		text-align: center;
		letter-spacing: 15rpx;

	}

	.yujing-word1 image {
		width: 50rpx;
		height: 50rpx;
		margin-top: 10rpx;
		position: absolute;
		top: 0;
		left: 0;
	}

	.box {
		width: 100%;
		background-color: #fff;
		border-bottom: 5rpx solid black;
	}

	.xuanchuan-tip {
		width: 90%;
		margin: auto;
	}

	.xuanchuan-tip text {

		font-size: 20rpx;
	}

	.xuanchuan-img1 {
		width: 85%;
		margin: auto;
		margin-top: 20rpx;

	}

	.xuanchuan-img1 img {
		width: 100%;
		margin: auto;
	}

	.xuanchuan-tip p {
		margin: 10rpx 0;
	}
</style>
